<% layout('/layouts/default.html', {title: '代码生成管理', libs: ['validate']}){ %>
<div class="card bd-0">
    <div class="card-header d-flex align-items-start justify-content-between box-header">
        <div class="pt-1">${genTable.isNewRecord ? '新增配置' : '编辑配置'}</div>
        <div class="d-flex">
        </div>
    </div>
    <#form:form id="inputForm" model="${genTable}" action="" method="post">
        <div class="card-body card-content-fixed pd-sm-t-30 pd-sm-b-40 pd-sm-x-30">
            <div class="form-group">
                <label>选择表</label>
                <input type="hidden" name="isNewRecord" value="true"/>
				<#form:select path="tableName" items="${tableList}" itemLabel="tableNameAndComments" itemValue="tableName" class="form-control select2"/>
            </div>
        </div>
        <div class="card-footer pd-sm-l-30">
            <div class="row">
                <div class="col-sm-offset-2 col-sm-10">
                    <button type="submit" class="btn btn-sm btn-primary">下一步</button>
                    <button type="button" class="btn btn-sm btn-default" onclick="js.closeCurrentTabPage()">关闭窗口</button>
                </div>
            </div>
        </div>
    </#form:form>
</div>
<% } %>
<script>
<% if(isNotEmpty(message!)){ %>
js.showMessage('${message}');
<% } %>
$("#inputForm").validate({
	submitHandler: function(form){
		form.submit();
    }
});
</script>
</body></html>